const shoppingmall = [
  {
    path: 'home/:id',
    redirect: 'home/:id/info'
  },
  {
    path: 'home/:id/info',
    component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/index'),
    children: [
      {
        path: '',
        name: 'MallHome',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/home')
      },
      {
        path: 'nomall',
        name: 'Nomall',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/nomall')
      },
      {
        path: 'search',
        name: 'MallSearch',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/search')
      },
      {
        // 购物车页面需要登录
        path: 'myCart',
        name: 'MyCart',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/shoppingCart')
      },
      {
        // 结算页面需要登录
        path: 'myCartSettlement',
        name: 'MyCartSettlement',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/settlement/index')
      },
      {
        path: ':goodsId',
        component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/routerView'),
        children: [
          {
            path: '',
            name: 'MallDetail',
            component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/detail')
          },
          {
            path: 'settlement',
            name: 'Settlement',
            component: () => import(/* webpackChunkName: "common" */ '@/viewShoppingmall/home/settlement/index')
          }
        ]
      }
    ]
  }
];

export default shoppingmall;
